

import 'package:syria_sports/data/models/error_model.dart';

import '../../core/utils/pref_utils.dart';
import '../apiClient/api_client.dart';
import '../apiClient/api_keys.dart';
import '../models/auth/user.dart';
import '../models/data.dart';
import '../remote/dio_helper.dart';

class AdminsController{
  static Future<Data?> getAllAdmins()async{
    var res = await DioHelper.getData( url: ApiClient.getAdmins, bearerToken: PrefUtils.getToken());

    if(res.statusCode != 200){
      ErrorModel.fromResponse(res);
      return null;
    }
    Data response = Data.fromJson(res.data);
    return response;
  }

}